package com.cqan.log.entity;

import java.util.Calendar;
import java.util.Date;

import javax.persistence.Entity;
import javax.persistence.Table;

import org.apache.commons.lang.builder.ToStringBuilder;

import com.cqan.entity.pk.LongEntity;

@Entity
//表名与类名不相同时重新定义表名.
@Table(name = "TBL_LOG_OPERATE")
//默认的缓存策略.
@SuppressWarnings("serial")
public class OperateLog extends LongEntity{

	private Date ctime;
	
	private String operName;
	
	private String type;
	
	private String user;
	
	public OperateLog(){}
	
	public OperateLog(String operName,String type,String user){
		this.ctime = Calendar.getInstance().getTime();
		this.operName = operName;
		this.type = type;
		this.user = user;
	}

	public String getUser() {
		return user;
	}

	public void setUser(String user) {
		this.user = user;
	}

	public Date getCtime() {
		return ctime;
	}

	public void setCtime(Date ctime) {
		this.ctime = ctime;
	}

	public String getOperName() {
		return operName;
	}

	public void setOperName(String operName) {
		this.operName = operName;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	@Override
	public String toString() {
		return ToStringBuilder.reflectionToString(this);
	}
	
}
